package com.yuntu.service;

import com.yuntu.pojo.User;
import com.yuntu.tools.PageUtil;

import java.util.List;

public interface UserService {
    /**
     * 登录
     * @param devCode
     * @param devPassword
     * @return
     * @throws Exception
     */
    User login(String devCode, String devPassword)throws Exception;

    /**
     * 分页
     * @param pageUtil
     * @return
     * @throws Exception
     */
    List<User> getPageList(PageUtil<User> pageUtil)throws Exception;

    /**
     * 添加
     * @param user
     * @return
     * @throws Exception
     */
    boolean add(User user)throws Exception;

    /**
     * 删除
     * @param id
     * @return
     * @throws Exception
     */
    boolean del(int id)throws Exception;

    /**
     * 根据id查询信息
     * @param id
     * @return
     * @throws Exception
     */
    User getUserById(int id)throws Exception;

    /**
     * 修改
     * @param user
     * @return
     * @throws Exception
     */
    boolean update(User user)throws Exception;

    /**
     * 验证重名
     * @param devCode
     * @return
     * @throws Exception
     */
    User exist(String devCode)throws Exception;
}
